package com.wangy.test.jdkProxy.impl;

import java.lang.reflect.Method;

import com.wangy.test.jdkProxy.Interceptor;

public class MyInterceptor implements Interceptor {

	public boolean before(Object proxy, Object target, Method method, Object[] args) {
		System.err.println("反射方法前逻辑。");
		return true;	//不反射被代理对象原有方法
	}

	public void around(Object proxy, Object target, Method method, Object[] args) {
		System.err.println("取代了被代理对象的方法。");
	}

	public void after(Object proxy, Object target, Method method, Object[] args) {
		System.err.println("反射方法后逻辑。");
	}

}
